<script>
	export default {
		globalData:{
			userInfo:null
		},
		onLaunch: function() {
			// 进入页面第一次token判断
			const token=uni.getStorageSync('token');
			const username=uni.getStorageSync('username');
			if(token){
				this.$http.users.getUserInfo(token,{username}).then((res)=>{
					if(res.code==200){
						this.globalData.userInfo=res.data;
						console.log(this.globalData);
					}
				})
				
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
